fix: support model prefix in with_dimensions/with_measures after joins#207
fix: support model prefix in with_dimensions/with_measures after joins#207boringdata wants to merge 3 commits intomainfrom
Conversation
Add prefix-aware column navigation to ColumnScope and MeasureScope so that dimension/measure lambdas can use model prefixes (e.g., `t.flights.carrier`) after joins. Previously this only worked in `.filter()`. Also adds _DimensionTableProxy for dimension evaluation with merged dimension map awareness. Closes #136 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lent fallback Proxy classes (_ColumnPrefixProxy, _DimPrefixProxy) now raise AttributeError when a prefixed name isn't found, preventing silent resolution to unrelated unprefixed columns. Also preserves AttributeError from proxy evaluation in Dimension.__call__ for proper dependency resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codex Review SummaryCodex (gpt-5.3-codex) reviewed this PR and found 2 P1 issues related to silent proxy fallbacks. Both have been fixed in commit bb07a6f: Issues Found & Fixed
All 103 tests passing after fixes. |
…211) * feat: support calculated_measures and .all() in YAML config Add `calculated_measures` section to YAML schema for derived metrics that reference other measures by name. Expressions are evaluated at runtime against MeasureScope, which also enables `.all()` for percent-of-total window aggregation patterns. Closes #202, closes #115 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: support model prefix in with_dimensions/with_measures after joins Add prefix-aware column navigation to ColumnScope and MeasureScope so that dimension/measure lambdas can use model prefixes (e.g., `t.flights.carrier`) after joins. Previously this only worked in `.filter()`. Also adds _DimensionTableProxy for dimension evaluation with merged dimension map awareness. Closes #136 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: raise on invalid prefixed column/dimension lookups instead of silent fallback Proxy classes (_ColumnPrefixProxy, _DimPrefixProxy) now raise AttributeError when a prefixed name isn't found, preventing silent resolution to unrelated unprefixed columns. Also preserves AttributeError from proxy evaluation in Dimension.__call__ for proper dependency resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: keep helpful dimension error formatting with proxy fallback --------- Co-authored-by: boringdata <boringdata@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
t.flights.carrier) inwith_dimensions()andwith_measures()after joins (Inconsistent model prefix behavior in lambdas: works in filter() but fails in with_dimensions/with_measures #136).filter()supported this pattern_ColumnPrefixProxytoColumnScope/MeasureScopeand_DimensionTableProxyfor dimension evaluationTest plan
test_model_prefix_in_with_dimensions—t.carriers.nameworks in with_dimensions after join🤖 Generated with Claude Code